package com.hisense.hiioc.formtable.util;

import com.alibaba.fastjson.JSON;
import com.hisense.hiioc.formtable.service.OperateTableService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class MapTest {

    @Autowired
    private OperateTableService operateTableService;

    public static void main(String[] args) {
        Map<String, Object> map = new HashMap<>();
        map.put("formId",214);
        map.put("formName","测试 FormTableName1");
        map.put("formDesc","1");
        map.put("formTableName","upload_form_table214");
        map.put("createTime","2019-07-16 11:09:00");

        Map<String, Object> map2 = new HashMap<>();
        map2.put("formId",13);
        map2.put("formName","ableName1");
        map2.put("formDesc","13");
        map2.put("formTableName","upload_form_table13");
        map2.put("createTime","2019-07-16 11:09:00");

        List<Map<String, Object>> list = new ArrayList<>();
        list.add(map);
        list.add(map2);
        System.out.println(list);

        String json= JSON.toJSONString(list);
        System.out.println(json);

    }
}
